#include <windows.h>
#include <stdio.h>

int main()
{
    SetConsoleOutputCP(65001);

    int min, max, temp;
    printf("please enter two numbers: ");
    scanf("%d %d", &min, &max);
    if (min > max)
    {
        temp = min;
        min = max;
        max = temp;
    }
    for (int i = min; i > 0; i--)
    {
        if (min % i == 0 && max % i == 0)
        {
            printf("最大公约数：%d\n", i);
            break;
        }
    }
}